package com.hr.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hr.mapper.AoaAttachmentListMapper;
import com.hr.entity.AoaAttachmentList;
import com.hr.service.AoaAttachmentListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (AoaAttachmentList)表服务实现类
 *
 * @author makejava
 * @since 2022-06-16 09:59:00
 */
@Service("aoaAttachmentListService")
public class AoaAttachmentListServiceImpl extends ServiceImpl<AoaAttachmentListMapper, AoaAttachmentList> implements AoaAttachmentListService {

    @Autowired
    AoaAttachmentListMapper aoaAttachmentListMapper;

    /**
     * 查询所有考勤数据
     * @return
     */
    @Override
    public Page<AoaAttachmentList> queryList(Page<AoaAttachmentList> page,String userName) {
//        List<AoaAttachmentList> list = this.baseMapper.selectList(new QueryWrapper<>());
        page = aoaAttachmentListMapper.queryList(page,userName);
        return page;
    }
    /**
     * 考勤修改数据
     * T:类型
     * Z:状态
     * B:备注
     * @return
     */
    @Override
    public int updateTZB(AoaAttachmentList a) {
        int i = this.baseMapper.updateById(a);
        return i;
    }

    /**
     * 根据id删除
     * @param a
     * @return
     */
    @Override
    public int deleteById(Long a) {
        int i = this.baseMapper.deleteById(a);
        return i;
    }

    @Override
    public List<AoaAttachmentList> queryYiZhou(String start,String end) {
        List<AoaAttachmentList> list = aoaAttachmentListMapper.queryYiZhou(start, end);
        return list;
    }

    @Override
    public List<AoaAttachmentList> queryMonth(String startSJ) {
        List<AoaAttachmentList> list = aoaAttachmentListMapper.queryMonth(startSJ);
        return list;
    }
    @Override
    public List<AoaAttachmentList> queryMonth(String startSJ, String deptS) {
        List<AoaAttachmentList> list = aoaAttachmentListMapper.queryMonth(startSJ,deptS);
        return list;
    }

    @Override
    public List<AoaAttachmentList> selectDept(String startSJ,String endSJ,String deptS) {
        List<AoaAttachmentList> list = aoaAttachmentListMapper.selectDept(startSJ,endSJ,deptS);
        return list;
    }




}

